package com.hhm.mmcro.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * controller一定要咋启动类下面
 */
@RestController //标注
public class MyController {

    @RequestMapping("list")
    public List<String> list(){
        ArrayList<String> list = new ArrayList<>();
        list.add("张三");
        list.add("李四");
        list.add("王五");
        list.add("赵六");

        return list;
    }
}
